<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th><input type="checkbox" class="checked-all" target="purchase-id"></th>
            <th>采购单号</th>
            <th>订单状态</th>
            <th>下单日期</th>
            <th>交货日期</th>
            <th>供应商</th>
            <th>总金额</th>
            <th>总数量</th>
            <th>调入仓库</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {foreach $list as $item}
        <tr>
            <td><input type="checkbox" class="purchase-id" name="purchase_id[]" value="{$item.purchase_id}"></td>
            <td class="copy-text">{$item.purchase_sn}</td>
            <td>{$item.order_status}</td>
            <td>{$item.business_date}</td>
            <td>{$item.delivery_date}</td>
            <td>{$item.producer ? $item.producer.name : ''}</td>
            <td>{$item.total_money|abs}</td>
            <td>{$item.total_qty}</td>
            <td>{$item.warehouse ? $item.warehouse.name : ''}</td>
            <td class="text-left">{$item.remark}</td>
            <td class="text-left">
                <a class="layui-btn layui-btn-xs layui-btn-normal purchase-recv" item="{$item.purchase_sn}">收货</a>
            </td>
        </tr>
        {/foreach}
        {empty name="list"}
        <tr>
            <td colspan="11">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>